home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / September 96 / Re Writing to a SUSink.2 < prev    next >
Encoding:
Internet Message Format  |  1996-09-19  |  1.8 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Writing to a SUSink
  2. Sent:        9/19/96 12:08 AM
  3. Received:    9/19/96 12:08 AM
  4. From:        jim@melongem.com (Jim Lloyd)
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List
  7.  
  8.  
  9. At 12:39 AM 9/19/96, Jerome Jahnke wrote:
  10. >>At 1:04 PM 9/18/96, Jerome Jahnke wrote:
  11. >>>I decided at a later date to make a part I had been working into an
  12. >>>embeddable part. So what I did is steal all the code from a new embeddable
  13. >>>part made with PartMaker but I can't open it.
  14. >>>
  15. >>>When I create the stationary I have this in my CBaseContent class.
  16. >>>
  17. >>>        unsigned long count = fProxyList->Count();
  18. >>>        archive << count;
  19. >>>
  20. >>>But when I try to open the stationry my Internalize function which looks
  21. >>>like this.
  22. >>>
  23. >>>        unsigned long count;
  24. >>>        archive >> count;
  25. >>>
  26. >>>says that count is 0x0000FFFF instead of 0x00000000 which is what I put
  27. >>>there. So why are the last four bytes F's instead of 0's and should I
  28. >>>convert those to FW_Fixed's which seem to write OK. I haven't tried that,
  29. >>>but this is the next step. I am curious if The sink is only reading or
  30. >>>writing the first four bytes. Or if I am doing something really really
  31. >>>wrong.
  32. >>
  33. >>Jer,
  34. >>
  35. >>The code you show should work correctly. I suspect that somewhere else
  36. >>you've got unbalanced reads and writes, so you're actually reading the
  37. >>wrong set of four bytes. Trace through both the write path and the read
  38. >>path and make sure everything is properly balanced.
  39. >
  40. >I did this, and when I change the value to short. It works fine. I thought
  41. >it was an unbalanced reading pair as well.
  42.  
  43. Jer,
  44.  
  45. When you change to shorts, do you use signed or unsigned shorts?
  46. Do you get correct results if you change your unsigned longs to to signed longs?
  47.  
  48. -Jim